package com.wkh.project.factory;

import lombok.Data;
import lombok.Setter;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;

/**
 * @author wangkehua
 * 配置类
 */
@Data
public class Configuration {
    @Setter
    private String apiHost = "https://api.ltzf.cn/";

    //开发者ID
    private final String appId;
    //商户号ID
    private final String merchantId;
    //商户密钥
    private final String partnerKey;

    public Configuration(String appId, String merchantId, String partnerKey) {
        this.appId = appId;
        this.merchantId = merchantId;
        this.partnerKey = partnerKey;
    }

    @Setter
    private OkHttpClient okHttpClient;
    @Setter
    private HttpLoggingInterceptor.Level logLevel = HttpLoggingInterceptor.Level.HEADERS;
    @Setter
    private long connectTimeout = 60;
    @Setter
    private long readTimeout = 60;
    @Setter
    private long writeTimeout = 60;
}
